
tmp<-read.table("intdhapp.res")
intdhapp <- t(tmp)
tmp <- read.table("euldhapp.res")
euldhapp <- t(tmp)
tmp<-read.table("intdhappav.res")
intdhappav <- t(tmp)
tmp <- read.table("euldhappav.res")
euldhappav <- t(tmp)


maxapp <- max(intdhapp, euldhapp, intdhappav, euldhappav)
minapp <- min(intdhapp, euldhapp, intdhappav, euldhappav)
iters <- seq(100, 15100, 500)
plot(iters,intdhapp, type="l",col="red",ylim=c(minapp,maxapp),ylab="Premium", xlab="Monte Carlo Iterations", main="Call Option Premium Approximation")
lines(iters,euldhapp, col="blue")
lines(iters,intdhappav, col="red", lty=2)
lines(iters,euldhappav, col="blue",lty=2)
abline(a=11.5543,b=0)
legend(5000,11.3,c("Approximation with Integral", "Approximation with Integral\nand Variance Reduction", "Approximation with Euler", "Approximation with Euler\nand Variance Reduction", "Analytic Result"), lty=c(1,2,1,2,1), col=c("red","red","blue","blue", "black"),y.intersp=1.22)